﻿using System;
using System.Collections.Generic;

using System.Text;
using System.Text.RegularExpressions;
using System.Qizx.Util;

namespace System.Text.RegularExpressions {
    public class Pattern : Regex {
        public static int UNIX_LINES = 0;
        public static int CASE_INSENSITIVE = 0;
        public static int DOTALL = 0;
        public static int MULTILINE = 0;
        public static int UNICODE_CASE = 0;
        public static int COMMENTS = 0;

        private string _pattern;

        public bool find() {
            return false; //TODO
            //查找 _toMatch
        }

        public void reset() {
            ;//TODO
        }

        public string pattern() {
            return _pattern;
        }

        public Pattern matcher(StringPattern stringPattern) {
            return null;
            //TODO
        }

        public static Pattern compile(string regex) {
            return new Pattern(regex);
        }

        internal Pattern(string regex)
            : base(regex) {
            _pattern = regex;
        }

        public static Pattern compile(string regex, int options) {
            return new Pattern(regex);//TODO
        }

        public int flags() {
            return 0;
        }
        /// <summary>
        /// 返回一个匹配项，现在一定是返回一个Match对象
        /// </summary>
        /// <param name="content"></param>
        /// <returns></returns>
        public Match matcher(string content) {
            return this.Match(content);
        }
    }
}
